import EventManage from "../../Framework/Managers/EventManage";
import { Stype } from "../Stype";
import { TcpClient } from "../TcpClient";


export class AuthProxy {
    public static Instance: AuthProxy = new AuthProxy();


    public init(): void {
        EventManage.Instance.on(Stype[Stype.Auth], this._onAuthServer, this);
    }

    private _onAuthServer(eName: string, msg: any): void {
        console.log(eName, msg);
    }

    public sendAuthMsg(ctype: Stype, data: any): void {
        TcpClient.Instance.sendMsg(Stype.Auth, ctype, data);
    }
}